package com.yu.config.base;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.List;


/**
 * @author jiangting
 * description: 分页参数
 * path: com.neucloud.iot.dm.common.base-BaseParam
 * date: 2022/5/16
 */
@ApiModel("分页参数")
@Data
public class BaseParam {
    @ApiModelProperty(value = "页码，从 1 开始", required = true, example = "1")
    @NotNull(message = "页码不能为空")
    @Min(value = 1, message = "页码最小值为 1")
    private Integer page = 1;

    @ApiModelProperty(value = "每页条数，最大值为 100", required = true, example = "10")
    @NotNull(message = "每页条数不能为空")
    @Min(value = 1, message = "每页条数最小值为 1")
    @Max(value = 100, message = "每页条数最大值为 100")
    private Integer size = 10;

    @ApiModelProperty(hidden = true)
    private List<String> deptIds;
    @ApiModelProperty(hidden = true)
    private List<String> createBys;
    @ApiModelProperty(hidden = true)
    private String createBy;

    @ApiModelProperty(value = "排序字段【对应表中的字段】")
    private String sortKey;
    @ApiModelProperty(value = "排序方式【DESC、ASC】")
    private String sortValue;

}
